<template>
    <!-- <div>封堵白名单</div> -->
    <a-row>
      <a-col>
        <a-card :bordered="false" style="margin-bottom: 10px">
          <!-- 查询区域 -->
          
          <div class="table-page-search-wrapper">
            <a-form-model ref="ruleForm" :model="pageFilter" :label-col="labelCol" :wrapper-col="wrapperCol">
                <div style="margin-left:20%">
                    <a-col :span="9">
                <a-form-model-item label="抽检编号">
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
                <a-col :span="9">
                <a-form-model-item label="抽检类型" style="margin-left:0px">
                    <a-select style="width:100%">
                    </a-select>
                </a-form-model-item>
                </a-col>
              <a-col :span="10">
                <a-form-model-item label="抽检周期"  :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
                    <a-radio-group >
                        <a-radio :value="1">
                            日检
                        </a-radio>
                        <a-radio :value="2">
                            周检
                        </a-radio>
                        <a-radio :value="3">
                            月检
                        </a-radio>
                        <a-radio :value="4">
                            年检
                        </a-radio>
                        <a-radio :value="5">
                            自定义
                        </a-radio>
                    </a-radio-group>
                </a-form-model-item>
              </a-col>
              <a-col :span="10">
                <a-form-model-item label="抽检范围" >
                    <a-range-picker />
                </a-form-model-item>
              </a-col>
              <a-col :span="5">
                <a-form-model-item label="范围总量" :label-col="{ span: 7 }" :wrapper-col="{ span: 15 }">
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
              <a-col :span="6">
                <a-form-model-item label="抽检方式" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }">
                    <a-radio-group >
                        <a-radio :value="1">
                            按比例
                        </a-radio>
                        <a-radio :value="2">
                            按数量
                        </a-radio>
                    </a-radio-group>
                </a-form-model-item>
              </a-col>
              <a-col :span="5">
                <a-form-model-item label="抽检比例" :label-col="{ span: 7 }" :wrapper-col="{ span: 15 }" style="display:flex">
                    <a-input placeholder="请输入任务名称" /><span class="icon">%</span>
                </a-form-model-item>
              </a-col>
              <a-col :span="5">
                <a-form-model-item label="抽检数量" :label-col="{ span: 7 }" :wrapper-col="{ span: 15 }">
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="移动验证量" >
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="移动验证率" >
                    <a-input placeholder="请输入任务名称" /><span class="icon">%</span>
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="联通验证量" >
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="联通验证率" >
                    <a-input placeholder="请输入任务名称" /><span class="icon">%</span>
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="电信验证量" >
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="电信验证率" >
                    <a-input placeholder="请输入任务名称" /><span class="icon">%</span>
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="抽检人" >
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="抽取时间" >
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="抽检状态" >
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
              <a-col :span="9">
                <a-form-model-item label="抽检完成时间" >
                    <a-input placeholder="请输入任务名称" />
                </a-form-model-item>
              </a-col>
                </div>
            </a-form-model>
          </div>
        </a-card>
        <a-card :bordered="false">
          <div>
            
            
            <z-table ref="table" rowKey="id" :showAlert="false" :showSelection="true" :loading="loading"
              :columns="columns" :dataSource="pageData" @selectedRowKey="onSelectedRow" @change="onTableChange">
             
            </z-table>
          </div>
         
        </a-card>
      </a-col>
    </a-row>
  </template>
  
  <script>
  export default {
    data () {
      return {
        show:false,
        labelCol: { span: 5 },
        wrapperCol: { span: 16 },
        loading: false,
        pageFilter: {
          pageNo: 1,
          pageSize: 10,
        },
        pageData: {
            records: [
          {
            realName: "111"
          }
        ]
        },
        columns:[
          {
            title: '序号',
            dataIndex: 'order',
            width: 60,
            align: 'center',
            customRender: (text, record, index) =>
              `${(this.pageFilter.pageNo - 1) * this.pageFilter.pageSize + (index + 1)}` //序号分页后连续
          },
          {
            title: '封堵地址',
            dataIndex: 'phone',
            align: 'center',
          },
          {
            title: '数据来源',
            dataIndex: 'phone',
            align: 'center',
          },
          {
            title: '发现时间',
            dataIndex: 'phone',
            align: 'center',
          },
          {
            title: '移动验证状态',
            dataIndex: 'phone',
            align: 'center',
          },
          {
            title: '移动封堵时间',
            dataIndex: 'phone',
            align: 'center',
          },
          {
            title: '联通验证状态',
            dataIndex: 'phone',
            align: 'center',
          },
          {
            title: '联通封堵时间',
            dataIndex: 'phone',
            align: 'center',
          },
          {
            title: '电信验证状态',
            dataIndex: 'phone',
            align: 'center',
          },
          {
            title: '电信封堵时间',
            dataIndex: 'phone',
            align: 'center',
          },
          {
            title: '批次号',
            dataIndex: 'phone',
            align: 'center',
          },
          

        ]
      }
    },
    methods: {
      Add(){
        this.$router.push({
        path: '/plugging/police/HandlPush/Add',
        query: {}
      })
      },
      Edit(){
        this.$router.push({
        path: '/plugging/police/HandlPush/Edit',
        query: {}
      })
      },
      Details(){
        this.$router.push({
        path: '/plugging/police/HandlPush/Details',
        query: {}
      })
      },
      onQuery() {
        this.pageFilter.pageNo = 1
        this.refreshTable()
        console.log(this.pageData);
      },
      //重置
      onResetForm() {
        this.pageFilter = {
          pageNo: 1,
          pageSize: 10,
          departmentId: this.departmentId
        }
        this.refreshTable()
      },
      onSelectedRow(keys) {
        this.selectKeys = keys
        this.isDisabled = keys.length > 0 ? false : true
      },
      onTableChange(pagination, pageFilter, sorter) {
        let keyMap = { currentPage: 'pageNo' }
        let paginations = Object.keys(pagination).reduce((newData, key) => {
          let newKey = keyMap[key] || key
          newData[newKey] = pagination[key]
          return newData
        }, {})
        this.pageFilter = Object.assign({}, this.pageFilter, paginations)
        this.refreshTable()
      },
    }
  }
  </script>
  
  <style lang="less" scoped>
  .search-wrapper-btn {
    position: absolute;
    right: 8%;
    top: 22px;
    z-index: 100;
  }
  /deep/.ant-form-item-children{
    display:flex;
  }
  .icon{
    font-size:15px;
    font-weight: 800;
    border:1px solid #ccc;
    width:2rem;
    height:2rem;
    text-align: center;
    line-height: 2rem;
  }
  </style>